/* ==================================== */
/* 1. リセットCSSと基本設定 */
/* ==================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: #f0f4f8; /* 背景色 */
    color: #333; /* 文字色 */
    display: flex; /* 中央寄せのためにflexboxを使用 */
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh; /* 画面全体の高さを確保 */
}

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 500px;
}

/* ==================================== */
/* 2. メインコンテナのデザイン */
/* ==================================== */
.container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    width: 100%;
    flex-grow: 1; /* 余白を埋めるためにコンテンツ部分を伸縮させる */
}

/* タイトルと説明文 */
h1 {
    font-size: 1.5rem;
    color: #4CAF50;
    margin-bottom: 5px;
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ==================================== */
/* 3. ボタンのデザイン */
/* ==================================== */
#decideButton {
    background-color: #4CAF50;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    width: 100%;
    margin-top: 20px; /* ジャンル選択との間にスペースを追加 */
}

#decideButton:hover {
    background-color: #45a049;
}

#decideButton:active {
    transform: scale(0.98);
}

/* ==================================== */
/* 4. アプリの状態表示 */
/* ==================================== */
.hidden {
    display: none !important;
}

#loading {
    margin-top: 20px;
    color: #888;
    font-size: 1.2rem;
}

/* ==================================== */
/* 5. 結果表示エリア */
/* ==================================== */
#result {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

#shopName {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

/* 画像と詳細のコンテナ */
.image-container {
    width: 100%;
    height: 250px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

#shopImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* お店の詳細情報 */
.shop-details {
    text-align: left;
    margin-bottom: 20px;
}

.shop-details p, .shop-details div {
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #555;
}

.shop-details div p {
    margin-bottom: 0;
}

/* マップリンク */
#mapLink {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4285F4; /* Googleの青 */
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

#mapLink:hover {
    background-color: #3c78d8;
}

/* ==================================== */
/* 6. フッターのデザイン */
/* ==================================== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    width: 100%;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

footer p {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #888;
}

/* ==================================== */
/* 7. 新しい要素のデザイン */
/* ==================================== */
.genre-selection {
    text-align: left;
    margin-bottom: 10px;
}

.genre-selection label {
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.genre-selection select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    color: #333;
}

/* お問い合わせページのボタン */
.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.email-button {
    background-color: #f2f2f2;
    color: #555;
}

.email-button:hover {
    background-color: #e0e0e0;
}

.x-button {
    background-color: #000;
    color: white;
}

.x-button:hover {
    background-color: #222;
}

.contact-button .icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.social-links {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

.social-links h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.social-links p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.social-link {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: #4285F4;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: #3c78d8;
}

.social-link + .social-link {
    margin-left: 10px;
}

/* 再検索ボタンのスタイルを追加 */
.retry-button {
    background-color: #ff9800; /* オレンジ色 */
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    width: 100%;
    margin-top: 20px;
}

.retry-button:hover {
    background-color: #fb8c00;
}

.retry-button:active {
    transform: scale(0.98);
}

/* ==================================== */
/* 8. スマートフォン向けの調整 */
/* ==================================== */
@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.8rem;
    }

    #decideButton {
        font-size: 1rem;
        padding: 12px 25px;
    }
}