*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #f8f6f2;
    color: #333;
    margin: 0;
    padding: 25px 20px 40px;
}

.site-container {
    max-width: 960px;
    margin: 0 auto;
}

/* ▼▼▼ ここからヘッダーのスタイルを変更 ▼▼▼ */
.site-header {
    text-align: center;
    position: relative;
    /* 猫耳配置の基準点 */
    background-color: #fff;
    padding: 10px 40px;
    /* 耳の分、上のパディングを増やす */
    margin-top: 45px;
    /* 耳の表示領域を確保 */
    margin-bottom: 50px;
    border-radius: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    /* 影を少し調整して立体感を出す */

    /* 猫耳のサイズや位置をCSS変数で管理 */
    --ear-size: 80px;
    --ear-spacing: 70px;
}

/* 猫耳の本体を追加 */
.site-header::before,
.site-header::after {
    content: '';
    position: absolute;
    width: var(--ear-size);
    height: var(--ear-size);
    background-color: inherit;
    /* 本体と同じ背景色を継承 */
    border-radius: 15px;
    /* 耳の先の丸み */
    transform: rotate(45deg);
    z-index: -1;
    /* ヘッダー本体の背面に配置 */
    top: calc(var(--ear-size) * -0.4);
    /* 耳を上半分だけ出す */
}

.site-header::before {
    /* 左耳 */
    left: var(--ear-spacing);
    background-color: #333;
}

.site-header::after {
    /* 右耳 */
    right: var(--ear-spacing);
    background-color: #333;
}

/* ▲▲▲ ここまでヘッダーの変更 ▲▲▲ */


.site-header h1 {
    font-size: 2rem;
    color: #444;
    margin-bottom: 0.3rem;
}

.site-header p {
    font-size: 1rem;
    color: #666;
}

/* --- 検索ボックス --- */
.search-container {
    margin-bottom: 35px;
}


#search-box {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-box:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- カテゴリ見出し --- */
.category-header {
    font-size: 1.6rem;
    color: #444;
    margin-top: 50px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.category-header:first-of-type {
    margin-top: 0;
}

/* --- 検索結果なしのメッセージ --- */
.no-results-message {
    text-align: center;
    margin-top: 40px;
    color: #666;
    font-size: 1.1rem;
}

.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.app-card {
    background-color: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.app-card-content {
    padding: 25px;
}

.app-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: #007bff;
}

.app-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.site-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    /* ▼▼▼ 猫耳レスポンシブ対応 ▼▼▼ */
    .site-header {
        margin-top: 40px;
        /* マージンを調整 */
        padding: 25px 5px;
        /* パディングを調整 */

        /* スマホでは耳を少し小さく、間隔を狭める */
        --ear-size: 70px;
        --ear-spacing: 50px;
    }

    /* ▲▲▲ ここまで ▲▲▲ */


    .site-header h1 {
        font-size: 1.8rem;
    }

    .site-header p {
        font-size: 1rem;
    }
}

.app-card-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.app-icon {
    width: 32px;
    height: 32px;
    margin-right: 25px;
    object-fit: contain;
}

.app-card h2 {
    margin: 0;
}

/* --- カード型広告のコンテナ --- */
.ad-container--card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.ad-container--card .ad-space {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}


/* --- スクロールトップボタン (尻尾) --- */
#scroll-to-top {
    position: fixed;
    width: 50px;
    height: 75px;
    bottom: 15px;
    right: 15px;

    background-image: url('assets/icons/cat-tail-silhouette.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;

    background-color: transparent;
    border: none;
    box-shadow: none;
    transform-origin: 50% 100%;

    animation: tail-flick 3s ease-in-out infinite;

    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#scroll-to-top:hover {
    background-color: transparent;
    animation-play-state: paused;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 尻尾が滑らかに揺れるアニメーション */
@keyframes tail-flick {
    0% {
        transform: rotate(-8deg);
    }

    50% {
        transform: rotate(8deg);
    }

    100% {
        transform: rotate(-8deg);
    }
}