:root {
    --primary-color: #6a82fb; /* 青 */
    --secondary-color: #fc5c7d; /* ピンク */
    --dark-bg: #222831;
    --light-text: #eee;
    --card-bg: rgba(255, 255, 255, 0.9);
    --frosted-glass-bg: rgba(255, 255, 255, 0.2); /* より透明なフロストグラス */
    --frosted-glass-border: rgba(255, 255, 255, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.25); /* 影を少し濃く */
    --shadow-strong: rgba(0, 0, 0, 0.4);
    --text-gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

body {
    margin: 0;
    padding-top: 60px; /* ナビゲーションバーの高さに合わせて調整 */
    min-height: 100vh;
    background: url("./5.png") center/cover no-repeat fixed; /* 背景画像を固定 */
    background-color: rgba(0, 0, 0, 0.6); /* 暗いオーバーレイを強化 */
    background-blend-mode: overlay;
    font-family: 'Noto Sans JP', sans-serif; /* プロフィールページと統一 */
    color: var(--light-text); /* 全体的に明るいテキスト色に */
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center; /* コンテンツを水平中央に */
    padding: 20px; /* 全体のパディング */
    box-sizing: border-box; /* パディングを幅に含める */
    overflow-y: auto; /* スクロール可能に */
}

/* カスタムスクロールバー */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}
body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.header-content {
    text-align: center;
    margin-bottom: 60px; /* メインコンテンツとの間隔 */
    margin-top: 40px; /* 上部の余白 */
}

h1 {
    font-size: 3.5em; /* より大きく */
    font-weight: 700;
    color: transparent;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 8px 20px var(--shadow-medium); /* 影を強調 */
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.header-content p {
    font-size: 1.4em;
    color: var(--light-text);
    text-shadow: 0 2px 8px var(--shadow-medium);
}

main {
    max-width: 900px; /* mainの最大幅を少し広げる */
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-card {
    background: var(--frosted-glass-bg); /* フロストグラス効果 */
    -webkit-backdrop-filter: blur(15px); /* ぼかしを強く */
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px; /* 角を丸く */
    box-shadow: 0 10px 30px var(--shadow-strong); /* 影を強く */
    border: 1px solid var(--frosted-glass-border);
    width: 100%;
    text-align: center;
    margin-top: 0; /* h1の下に来るように調整 */
}

.main-card h2, .main-card h3 {
    font-size: 2em;
    font-weight: 700;
    color: var(--light-text);
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 3px 10px var(--shadow-light);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.button-row {
    display: flex;
    flex-wrap: wrap; /* 折り返しを許可 */
    gap: 20px; /* ボタン間のスペース */
    justify-content: center;
    margin-bottom: 40px;
}

.stat-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px; /* ボタンサイズを少し大きく */
    height: 140px;
    background: var(--dark-bg); /* 暗い背景 */
    color: white;
    border: none;
    border-radius: 15px; /* 角を丸く */
    cursor: pointer;
    box-shadow: 0 6px 15px var(--shadow-medium); /* 影を強化 */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    text-align: center;
    text-decoration: none; /* リンクの下線を削除 */
    font-weight: bold;
    position: relative;
    overflow: hidden; /* ホバーエフェクト用 */
}

.stat-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-gradient); /* ホバー時のグラデーション */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.stat-button:hover::before {
    opacity: 0.8;
}

.stat-button:hover {
    transform: translateY(-5px); /* 強く浮き上がる */
    box-shadow: 0 15px 30px var(--shadow-strong); /* 影をさらに強く */
}

.stat-button img {
    width: 60px; /* アイコンサイズを大きく */
    height: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5)); /* アイコンに影 */
    position: relative;
    z-index: 1;
}

.stat-button span {
    font-size: 1.1em; /* テキストサイズを大きく */
    font-weight: bold;
    position: relative;
    z-index: 1;
}

/* 検索フォームのスタイル */
#searchContainer {
    background: var(--frosted-glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-medium);
    border: 1px solid var(--frosted-glass-border);
    width: 80%; /* 幅を調整 */
    max-width: 600px;
    margin-top: 30px;
}

#searchContainer h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--light-text);
    font-size: 1.8em;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

#searchForm {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}

#searchForm input,
#searchForm button {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.1rem;
    padding: 12px 20px;
    height: 50px;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#searchForm input {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #333;
    border: 1px solid #ddd;
}

#searchForm input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(106, 130, 251, 0.3);
}

#searchForm button {
    background: var(--text-gradient);
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--shadow-light);
    flex-shrink: 0;
}

#searchForm button:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.result {
    font-size: 1.1em;
    color: var(--light-text);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* レスポンシブデザイン */
@media(max-width: 800px) {
    h1 {
        font-size: 3em;
    }
    .header-content p {
        font-size: 1.2em;
    }
    .main-card {
        padding: 30px;
    }
    .main-card h2, .main-card h3 {
        font-size: 1.8em;
    }
    .button-row {
        gap: 15px;
    }
    .stat-button {
        width: 120px;
        height: 120px;
        border-radius: 12px;
    }
    .stat-button img {
        width: 50px;
        height: 50px;
    }
    .stat-button span {
        font-size: 1em;
    }
}

@media(max-width: 600px) {
    body {
        padding-top: 50px;
    }
    h1 {
        font-size: 2.5em;
        letter-spacing: 2px;
    }
    .header-content p {
        font-size: 1em;
    }
    .main-card {
        padding: 20px;
        border-radius: 15px;
    }
    .main-card h2, .main-card h3 {
        font-size: 1.5em;
        margin-bottom: 25px;
    }
    .button-row {
        gap: 10px;
    }
    .stat-button {
        width: 100px;
        height: 100px;
        border-radius: 10px;
    }
    .stat-button img {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    .stat-button span {
        font-size: 0.9em;
    }
}

@media(max-width: 400px) {
    h1 {
        font-size: 2em;
    }
    .header-content p {
        font-size: 0.9em;
    }
    .stat-button {
        width: 85px;
        height: 85px;
    }
    .stat-button img {
        width: 35px;
        height: 35px;
    }
    .stat-button span {
        font-size: 0.8em;
    }
}