@font-face {
    font-family: 'KanjyukuGothic';
    src: url('/KanjyukuGothic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html,
body {
    font-family: 'KanjyukuGothic', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
}

.pokemon-card {
    transition: all 0.3s ease;
}
.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pokemon-image {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SP版ヘッダー対応 */
@media (max-width: 768px) {
    /* ヘッダーのボタンテキストサイズ調整 */
    header a.inline-block {
        font-size: 0.75rem !important;
    }

    /* ヘッダーのパディング調整 */
    header .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* ヘッダーのアイコンサイズ調整 */
    header .w-10 {
        width: 2rem !important;
        height: 2rem !important;
    }

    header .w-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    /* ヘッダーのタイトル非表示 */
    header h1 {
        display: none !important;
    }

    /* ヘッダーの説明文非表示 */
    header p {
        display: none !important;
    }

    /* ヘッダーのボタン間隔調整 */
    header .space-x-1 > * + * {
        margin-left: 0.25rem !important;
    }

    /* ヘッダーの全体レイアウト調整 */
    header .flex {
        gap: 0.5rem !important;
    }

    /* ヘッダーのアイコンとテキストの間隔調整 */
    header .space-x-2 > * + * {
        margin-left: 0.5rem !important;
    }

    /* ヘッダーのボタンパディング調整 */
    header a.inline-block {
        padding: 0.375rem 0.5rem !important;
    }

    /* ヘッダーのアイコン内のフォントサイズ調整 */
    header i.fas {
        font-size: 0.875rem !important;
    }

    /* SP版ポケモンカード対応 */
    #pokemon-grid {
        gap: 0.5rem !important;
    }

    #pokemon-grid .pokemon-card {
        border-radius: 0.5rem !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }

    #pokemon-grid .pokemon-card:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    }

    /* 画像エリア */
    #pokemon-grid .pokemon-card .bg-gray-50 {
        padding: 0.75rem !important;
    }

    #pokemon-grid .pokemon-card img,
    #pokemon-grid .pokemon-card .w-24 {
        width: 4.5rem !important;
        height: 4.5rem !important;
    }

    /* 情報エリア */
    #pokemon-grid .pokemon-card > a > div:last-child {
        padding: 0.5rem !important;
    }

    #pokemon-grid .pokemon-card h3 {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.125rem !important;
    }

    #pokemon-grid .pokemon-card h3 .text-sm {
        font-size: 0.6rem !important;
    }

    #pokemon-grid .pokemon-card .mb-1 {
        margin-bottom: 0.125rem !important;
    }

    #pokemon-grid .pokemon-card .mb-2 {
        margin-bottom: 0.25rem !important;
    }

    /* タイプバッジ */
    #pokemon-grid .pokemon-card .type-badge {
        font-size: 0.5rem !important;
        padding: 1px 4px !important;
        margin: 0.5px !important;
    }

    #pokemon-grid .pokemon-card .flex.space-x-1 {
        gap: 0.125rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* 種族値表示 */
    #pokemon-grid .pokemon-card .text-center {
        margin-top: 0.25rem !important;
    }

    #pokemon-grid .pokemon-card .text-xs {
        font-size: 0.55rem !important;
        display: inline !important;
        margin-right: 0.25rem !important;
    }

    #pokemon-grid .pokemon-card .text-lg {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        display: inline !important;
    }

    #pokemon-grid .pokemon-card .text-4xl {
        font-size: 2rem !important;
    }

    /* SP版フィルターセクション調整 */
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .container > .bg-white {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .py-8 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .space-y-3 > * + * {
        margin-top: 0.5rem !important;
    }

    .gap-3 {
        gap: 0.5rem !important;
    }

    input, select {
        padding-top: 0.375rem !important;
        padding-bottom: 0.375rem !important;
    }
}

