:root {
    --bg-pink: #fff0f3;
    --primary-pink: #ff8fa3;
    --dark-pink: #ff4d6d;
    --text-color: #590d22;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 40px -10px rgba(255, 143, 163, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    /* 背景画像を透かして見せるため、グラデーションを半透明（0.85）にしています */
    background: linear-gradient(135deg, rgba(255,229,236,0.85) 0%, rgba(255,194,209,0.85) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 上部に合わせる */
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* 背景画像（アクセント）のスライドショー用スタイル */
.bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 最背面に配置 */
    overflow: hidden;
    background: #ffe5ec;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideFade 16s infinite;
}

.bg-slide.slide2 {
    animation-delay: 8s;
}

@keyframes slideFade {
    0% { opacity: 0; transform: scale(1.0); }
    10% { opacity: 0.5; } /* 薄く表示してアクセントに */
    40% { opacity: 0.5; }
    50% { opacity: 0; transform: scale(1.05); } /* ゆっくりズーム */
    100% { opacity: 0; }
}

/* 桜の背景アニメーション用 */
.sakura-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sakura-petal {
    position: absolute;
    background-color: #ffb3c6;
    border-radius: 15px 0 15px 0;
    opacity: 0.8;
    animation: fall linear infinite;
    box-shadow: 0 0 8px rgba(255, 179, 198, 0.6);
}

@keyframes fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(20vw) rotate(360deg);
        opacity: 0;
    }
}

/* ガラスモフィズム（Glassmorphism）コンテナ */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 900px;
    box-shadow: var(--shadow);
    z-index: 1;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 35px;
}

h1 {
    font-size: 2.8rem;
    color: var(--dark-pink);
    margin-bottom: 10px;
    font-family: 'Kiwi Maru', serif;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.highlight {
    color: var(--primary-pink);
    font-size: 2.2rem;
    font-weight: 500;
}

header p {
    font-size: 1.2rem;
    color: #800f2f;
    font-weight: 700;
}

main {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* 動画プレイヤー */
.player-wrapper {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 77, 109, 0.15);
    aspect-ratio: 16 / 9;
    border: 3px solid #fff;
    transition: transform 0.3s ease;
}

.player-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 77, 109, 0.2);
}

.iframe-container {
    width: 100%;
    height: 100%;
    display: none;
}

.iframe-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 動画未選択時のプレースホルダー */
.placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,230,234,0.8), rgba(255,183,197,0.8));
    color: var(--dark-pink);
    gap: 20px;
    display: none;
}

.placeholder.show {
    display: flex;
}

.placeholder p {
    font-size: 1.3rem;
    font-family: 'Kiwi Maru', serif;
    font-weight: 500;
}

.play-icon {
    color: var(--primary-pink);
    text-shadow: 0 4px 10px rgba(255,255,255,0.5);
    animation: float 3s ease-in-out infinite;
}

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

/* 動画リスト */
.playlist-section h2 {
    color: var(--dark-pink);
    margin-bottom: 20px;
    font-size: 1.6rem;
    border-bottom: 3px dotted var(--primary-pink);
    padding-bottom: 10px;
    display: inline-block;
    font-family: 'Kiwi Maru', serif;
}

.playlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.playlist-item {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.playlist-item:hover {
    transform: translateY(-4px) scale(1.02);
    background: #fff;
    box-shadow: 0 8px 20px rgba(255, 143, 163, 0.3);
    border-color: var(--primary-pink);
}

.playlist-item.active {
    background: #fff;
    border-color: var(--dark-pink);
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
    position: relative;
    overflow: hidden;
}

.playlist-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: var(--dark-pink);
    border-radius: 6px 0 0 6px;
}

.item-icon {
    width: 45px;
    height: 45px;
    background: var(--bg-pink);
    color: var(--primary-pink);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.playlist-item.active .item-icon {
    background: var(--dark-pink);
    color: #fff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(255, 77, 109, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

.item-info {
    flex-grow: 1;
}

.item-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: #590d22;
}

.item-desc {
    font-size: 0.9rem;
    color: #800f2f;
    opacity: 0.8;
}

footer {
    text-align: center;
    margin-top: 50px;
    color: #800f2f;
    font-size: 0.95rem;
    font-weight: 700;
}

/* キャラクターのデコレーション（画面左下・右下に配置） */
.character-deco {
    position: fixed;
    bottom: -15px;
    width: 25vw;
    max-width: 280px;
    min-width: 150px;
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    z-index: 5; /* ガラスコンテナより手前 */
    pointer-events: none; /* クリックの邪魔にならないように */
    animation: floatAnim 4s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 143, 163, 0.4));
}

.deco-left {
    left: 2%;
    background-image: url('hug1.png');
    animation-delay: 0s;
}

.deco-right {
    right: 2%;
    background-image: url('hug2.png');
    animation-delay: 1.5s;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@media (max-width: 1300px) {
    .character-deco {
        opacity: 0.8;
        z-index: -1; /* 画面が狭くなったら後ろに隠す */
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .character-deco {
        display: none; /* スマホでは非表示 */
    }

    body {
        padding: 20px 10px;
    }

    .glass-container {
        padding: 25px 15px;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }

    .highlight {
        font-size: 1.6rem;
    }
    
    .playlist {
        grid-template-columns: 1fr;
    }
}
