/* 基本スタイル */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #f44336;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --light-bg-color: #ffffff;
    --font-family: 'M PLUS Rounded 1c', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* スクロールバーを非表示 */
}

/* 画面の基本設定 */
.screen {
    display: none; /* 基本は非表示 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.screen.active {
    display: flex; /* 表示する画面 */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
}

/* 各画面の背景 */
#title-screen {
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url(https://images.pexels.com/photos/1586795/pexels-photo-1586795.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1);
}
#end-screen {
    background-image: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)), url(https://images.pexels.com/photos/36717/amazing-animal-beautiful-beautifull.jpg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1);
}

.content-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 800px;
}

/* テキストスタイル */
.title {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    line-height: 1.2;
}

.subtitle {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.message {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ボタン共通スタイル */
button {
    font-family: var(--font-family);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 15px 40px;
    transition: transform 0.2s, box-shadow 0.2s;
}
button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.action-button {
    background-color: var(--primary-color);
    color: white;
}

.secondary-button {
    background-color: #f0f0f0;
    color: var(--text-color);
    margin-top: 20px;
}

/* 場所選択画面 */
.location-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.location-card {
    background-color: var(--light-bg-color);
    border: 2px solid #eee;
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    width: 250px;
    height: 250px;
}
.location-card img {
    width: 100%;
    height: 80%;
    object-fit: cover;
}
.location-card p {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 10px 0;
}

/* 操作説明画面 */
.instruction-box {
    background-color: #e8f5e9;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
    display: inline-block;
}
.instruction-box ul {
    list-style: none;
    padding-left: 0;
}
.instruction-box li {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

/* 散歩画面 */
#walk-screen {
    padding: 0;
}

#viewer {
    width: 100%;
    height: 100%;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 下のビューワーを操作可能にする */
}

.command-guide {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 1.2rem;
}

.finish-button {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: auto; /* このボタンだけクリック可能にする */
}

.speech-indicator-wrapper {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
}

.speech-indicator {
    width: 20px;
    height: 20px;
    background-color: #ccc;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.speech-indicator.listening {
    background-color: #ff4d4d;
    animation: pulse 1.5s infinite;
}

#speech-text {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

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