:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #ec4899;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Type tokens */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

select, input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-card);
    transition: all 0.2s;
    outline: none;
}

select:focus, input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Multi-filter specific */
.fav-filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fav-filter-row {
    display: flex;
    gap: 8px;
}

.fav-filter-row select {
    flex: 1;
}

.remove-filter-btn {
    padding: 0 12px;
    background-color: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.remove-filter-btn:hover {
    background-color: #fecaca;
}

.add-filter-btn {
    margin-top: 10px;
    padding: 10px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.add-filter-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Pokemon Grid & Cards */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.pokemon-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.pokemon-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* 画像コンテナ削除 */

.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--text-main);
}

.card-tags-section {
    margin-bottom: 12px;
}

.card-tags-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.tag.env {
    background: #ecfdf5;
    color: #059669;
    border-color: #d1fae5;
}

.tag.fav {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.tag:hover {
    transform: scale(1.05);
}

/* Detail Page specific */
.detail-header {
    text-align: center;
    margin-bottom: 40px;
}

/* メイン画像スタイル削除 */

.detail-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-main);
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Placeholder replacements */
/* プレースホルダ削除 */

/* Related Items (pokemon.html uses item-grid) */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.item-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* アイテム画像コンテナ削除 */

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
        margin: 20px auto;
    }
    h1 {
        font-size: 1.8rem;
    }
    .controls {
        padding: 16px;
    }
}

/* Footer Disclaimer */
.site-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}
