body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: auto;
    /* padding: 20px; */
    width: 1200px;
}
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.logo-container {
    text-align: center;
}

.logo-container img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ✅ カテゴリのスタイル */
.category-section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.category-section h2 {
    margin-top: 0;
    font-size: 24px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

/* ✅ サブカテゴリのスタイル */
.subcategory-section {
    margin-top: 20px;
    margin-left: 20px;
}
.subcategory-section h3 {
    margin-top: 0;
    font-size: 20px;
    color: #333;
}

/* ✅ 絵文字のグリッド配置 */
.emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 5px;
}

/* ✅ 絵文字カードのスタイル */
.emoji-card {
    background-color: #fff;
    border: 1px solid #ddd;
    font-size: 30px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center; /* ✅ 中央揃え有効 */
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 60px; /* ✅ 絵文字カードの幅を60pxに固定 */
    height: 60px;
}
.emoji-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.emoji-card p {
    margin: 2px 0;
}
.emoji-card span {
    font-size: 32px;
}

/* ✅ 検索フォームのスタイル */
form {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

/* ✅ 検索バー（input）のスタイル */
input[type="text"] {
    width: 400px; /* 🔥 横幅を広げる */
    padding: 12px 15px;
    font-size: 16px; /* 📚 文字サイズを大きく */
    border: 1px solid #ccc;
    border-radius: 25px; /* 🎨 角丸デザイン */
    outline: none;
    transition: all 0.3s ease-in-out;
}

/* ✅ 検索バーにフォーカス時のスタイル */
input[type="text"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

/* ✅ 検索ボタンのスタイル */
button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    margin-left: 10px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* ✅ ホバー時のボタンスタイル */
button:hover {
    background-color: #45a049;
}

.search-pc {
    display: inline-block;
}

/* ✅ スマホ用ボタンを非表示 */
.search-mobile {
    display: none;
}

.advertise {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.advertise img {
    width: 500px;
}

.ad-roller-container {
    width: 500px;
    height: 64px;
    margin: 20px auto;
    overflow: hidden;
    /* position: relative; */
    /* perspective: 1500px;  */
    
  }
  
  .ad-roller {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
    transform-origin: center center;
    position: relative;
    /* scale: 0.95;  */
  }
  
  .ad-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 500px;
    height: 64px;
    backface-visibility: hidden;
    margin: 0px;
  }


  .ad-face:nth-child(1) {
    transform: rotateX(0deg) translateZ(16px);
  }
  
  .ad-face:nth-child(2) {
    transform: rotateX(180deg) translateZ(16px);
  }
  
  .ad-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .site-footer {
    margin-top: 50px;
    padding: 20px;
    background-color: #f5f5f5;
    text-align: center;
    font-size: 14px;
  }
  
  .site-footer a {
    color: #333;
    text-decoration: none;
    margin: 0 8px;
  }
  
  .site-footer a:hover {
    text-decoration: underline;
  }

/* ✅ レスポンシブ対応 */
@media (max-width: 600px) {
    body {
        width: 100%;
    }
    .emoji-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .emoji-card {
        width: 40px;
        height: 40px;
    }
    .emoji-card span {
        font-size: 32px;
    }

    .search-container {
        flex-direction: column;
        align-items: stretch;
        width: 90%;
    }

    input[name="q"] {
        width: 60%;
        margin-bottom: 10px;
        margin: auto;
        margin-right: 10px;
    }

    button {
        width: 45px; /* ✅ スマホではさらに小さく */
        height: 45px; /* ✅ 高さも同様 */
        padding: 6px;
        font-size: 16px; /* ✅ スマホ用のアイコンサイズを調整 */
        margin-left: 10px;
    }

   

    .search-pc {
        display: none;
    }
    .search-mobile {
        display: inline-block;
        margin-left: -8px;
    }
    .advertise {
        display: flex;
        justify-content: center;
    }
    .advertise img{
        width: 100%;
        margin-top: 20px;
    }

    .ad-roller-container {
        width: 100%;
        max-width: 500px;
        margin: 20px auto;
        /* overflow: hidden;  */
      }
    
      .ad-face {
        width: 100%;
        /* height: 100%; */
      }
    
      .ad-face img {
        width: 100%;
        height: 100%;
        object-fit: contain; 
        display: block;
      }
}