/* ベーススタイル */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap'); */
body {
    /* font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
    /* font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
    margin: 0;
    padding: 1rem;
    background: #ffffff;
    color: #333;
    line-height: 1.5;
}

.title-area {
    background-color: purple; /* または #800080 など紫色のカラーコード */
    color: white;
    max-width: 360px;
    height: 60px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 上下中央 */
    align-items: center;     /* 左右中央（必要なら） */

    gap: 1rem;
}

h1,h2,h4 {
    text-align: center;
    margin-bottom: 1rem;
    font-weight: lighter;
}

h3,h5 {
    text-align: center;
    margin-bottom: 1rem;
    font-weight: normal;
}

form {
    max-width: 360px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

select {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #ededed;
    border-radius: 12px;
    background: rgb(240, 240, 240);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 下方向に柔らかい影 */

}

button {
    display: block;
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
    padding: 0.75rem 5rem;
    font-size: 1.1rem;
    background-color: #265ecf;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover,
button:focus {
    background-color: #3677f8;
    outline: none;
}

li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

li:last-child {
    border-bottom: none;
}

.nav-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #a82dc4;   /* 青背景 */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.nav-button:hover,
.nav-button:focus {
    background-color: #be33dd; ;
    color: white;
    outline: none;
}

.results {
    margin-top: 20px;
    text-align: left;
    width: 90%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.result-item {
    font-size: 16px;
    margin: 4px 0;
    padding: 12px;
    border-radius: 6px;
    border: 3px solid #cacaca;
    background-color: rgb(255, 255, 255);
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.1); */
}
    /* 上部固定バー */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;              /* バーの高さ */
    background-color: #8b23a2;  /* バーの色を紫に */
    display: flex;
    justify-content: center;
    align-items: center;       /* 縦方向中央揃え */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* ロゴ画像 */
.top-bar img {
    height: 50px;   /* 画像の高さ */
}

/* コンテンツ部分 */
.content {
    margin-top: 80px; /* バーの高さ分余白を確保 */
    padding: 20px;
}

.modal {
  display: none; /* 初期状態では非表示 */
  position: fixed; /* 画面に固定 */
  z-index: 1; /* 他の要素より手前に表示 */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4); /* 半透明の黒背景 */
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* 上下中央に配置 */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* 幅 */
  max-width: 400px;
  text-align: center;
  border-radius: 5px;
}

.modal-content button {
  padding: 10px 20px;
  margin-top: 15px;
  cursor: pointer;
}

.button-container {
    display: flex;               /* 横並びにする */
    justify-content: center;     /* 中央寄せ */
    gap: 20px;                   /* ボタン同士の間隔 */
    margin-top: 20px;
}


/* 1位～3位の強調 */
.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFEF9F);
    font-weight: bold;
}
.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #E0E0E0);
    font-weight: bold;
}
.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #E5B07F);
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (min-width: 600px) and (max-width: 900px) {
    body {
        padding: 2rem;
    }

    form, ol, a {
        max-width: 540px;
    }

    select, button, a {
        font-size: 1.25rem;
    }

    li {
        font-size: 1.125rem;
    }
}