/* アプリケーション専用基本スタイル */
.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f0f2f5;
    padding-top: 70px; /* 固定ヘッダー分 */
}

.app-main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* 基本スタイル */
.guide-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.guide-container {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'Meiryo', 'メイリオ', sans-serif;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 1120px; 
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    animation: fadeIn 1s ease-out;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* スライドシステム */
.slides-viewport {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.slides-wrapper {
    display: flex;
    height: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
}

.slide.active {
    opacity: 1;
    z-index: 1;
    visibility: visible;
}

/* 表紙スライドのスタイル */
.cover {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cover::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 20%, transparent 20%);
    background-size: 20px 20px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

.title {
    font-size: 3.5em; 
    font-weight: bold; 
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); 
    z-index: 1;
}

.subtitle { 
    font-size: 1.4em; 
    opacity: 0.9; 
    margin-bottom: 30px; 
    z-index: 1; 
}

.characters { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    z-index: 1; 
}

.character {
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 3em; 
    animation: bounce 2s infinite; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.ai { 
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%); 
    animation-delay: 0.5s; 
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 通常スライドのスタイル */
.content-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    border-left: 5px solid #74b9ff;
    height: 100%;
}

.section-title {
    font-size: 1.8em; 
    color: #2d3436; 
    margin-bottom: 15px;
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.section-icon {
    font-size: 1.2em; 
    padding: 10px; 
    border-radius: 50%;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%); 
    color: white;
}

.section-content { 
    font-size: 1.1em; 
    line-height: 1.8; 
    color: #636e72; 
}

.point-box {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%); 
    color: #004d40;
    padding: 20px; 
    border-radius: 10px; 
    margin-top: 20px; 
    border-left: 5px solid #00796b;
}

.point-box h4 { 
    margin-bottom: 10px; 
    font-size: 1.2em; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

/* ナビゲーションボタン */
.slide-nav {
    background: #2d3436;
    color: white;
    padding: 15px 30px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.nav-button {
    background-color: #0984e3;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: #74b9ff;
    transform: translateY(-2px);
}

.nav-button:disabled {
    background-color: #636e72;
    cursor: not-allowed;
    opacity: 0.5;
}

.slide-counter {
    font-size: 1em;
    font-weight: bold;
}

/* スクロールバー */
.slide::-webkit-scrollbar { width: 8px; }
.slide::-webkit-scrollbar-track { background: #f1f2f1; border-radius: 10px; }
.slide::-webkit-scrollbar-thumb { background: #74b9ff; border-radius: 10px; }
.slide::-webkit-scrollbar-thumb:hover { background: #0984e3; }

/* クイズ */
.quiz-options { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.quiz-option { background-color: #f0f0f0; border: 2px solid #ddd; padding: 15px; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; font-size: 1.1em; text-align: left; display: flex; justify-content: flex-start; align-items: center; gap: 15px; }
.quiz-option:hover { background-color: #e0e0e0; transform: translateY(-2px); }
.quiz-feedback { margin-top: 20px; padding: 15px; border-radius: 10px; animation: fadeIn 0.5s; }
.feedback-correct { background-color: #e8f5e9; border-left: 5px solid #4caf50; }
.feedback-incorrect { background-color: #ffebee; border-left: 5px solid #f44336; }
.feedback-title { font-weight: bold; font-size: 1.2em; margin-bottom: 10px; }
.feedback-explanation { line-height: 1.7; }
.quiz-nav-button { display: block; width: 100%; background-color: #0984e3; color: white; border: none; border-radius: 50px; padding: 15px 20px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: all 0.3s ease; margin-top: 20px; text-align: center; text-decoration: none; }
.quiz-nav-button:hover { background-color: #74b9ff; }

/* 音声再生ボタン */
.audio-player { cursor: pointer; color: #0984e3; font-size: 1.5em; margin: 0 10px; display: inline-block; flex-shrink: 0; }
.audio-player.playing i { color: #d63031; }

/* レスポンシブ */
@media (max-width: 768px) {
    .app-main { padding: 10px; }
    .guide-container { width: 100%; height: auto; max-height: none; aspect-ratio: auto; }
    .slide { padding: 20px; }
    .title { font-size: 2.5em; }
    .character { width: 100px; height: 100px; font-size: 2.5em; }
}